<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<style type="text/css">
.tdh {
	font-size: 16px;
	text-align: center;
	height: 30px;
}

.thd {
	font-size: 16px;
	text-align: center;
	background-color: lightblue;
}

table {
	width: 100%;
}
</style>
<script type="text/javascript">
	function choseGood(id, name, marketPrice) {
		onGoodChoosed(id, name, marketPrice);
		addGoodDialog.close();
	}
</script>
<div>
	<div>
		<div class="row">
			<table border="1px" style="table-layout: fixed;">
				<thead>
					<tr>
						<th width="5%" class="thd"><input type="checkbox"
							hidden="hidden" />选择</th>
						<th width="15%" class="thd">商品ID</th>
						<th width="20%" class="thd">商品名称</th>
						<th width="10%" class="thd">商品分公司价格</th>
					</tr>
				</thead>
				<tbody>
					<c:if test="${fn:length(goodList) > 0}">
						<c:forEach items="${goodList }" var="good" varStatus="s">
							<tr
								onclick="choseGood('${good.id}','${good.name}','${good.marketPrice}')">
								<td class="tdh"><input type="checkbox" name="check"
									value="${good.id}" /></td>
								<td class="tdh">${good.id}</td>
								<td class="tdh">${good.name}</td>
								<td class="tdh">${good.marketPrice}</td>
							</tr>
						</c:forEach>
					</c:if>
				</tbody>
			</table>
		</div>
	</div>
</div>
